package com.sunlands.qdcy.tongzhuo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @author zhangxiaobin
 * @author anjl
 * @date 2019/5/3011:14
 */
@ApiModel(value = "日记详情信息")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DiaryVO {

    @ApiModelProperty(value = "日记ID")
    private Long id;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "用户头像")
    private String userAvatarUrl;

    @ApiModelProperty(value = "用户身份")
    private String identityName;

    @ApiModelProperty(value = "用户名称")
    private String userName;

    @ApiModelProperty(value = "用户性别 性别 0 男 1 女")
    private Integer sex;

    @ApiModelProperty(value = "用户目标")
    private String userCurrentLearnTargetName;

    @ApiModelProperty(value = "日记内容")
    private String content;

    @ApiModelProperty(value = "图片内容")
    private List<String> imgUrls;

    @ApiModelProperty(value = "视频内容")
    private List<String> videoUrls;

    @ApiModelProperty(value = "话题id")
    private Long topicId;

    @ApiModelProperty(value = "话题名称")
    private String topicName;

    @ApiModelProperty(value = "0自建  1转发")
    private Integer createType;

    @ApiModelProperty(value = "评论数量")
    private Integer commentCount;

    @ApiModelProperty(value = "点赞数量")
    private Integer zanCount;

    @ApiModelProperty(value = "转发的ID，标记从哪条日记转发的")
    private Long forwardId;

    @ApiModelProperty(value = "根日记id，如果createType为转发 ，rootId存储被转发日记的id")
    private Long rootId;

    @ApiModelProperty(value = "转发数量")
    private Long forwardCount;

    @ApiModelProperty(value = "转发根日记，如果createType为转发，rootDiary会存储被转发的日记数据")
    private DiaryVO rootDiary;

    @ApiModelProperty(value = "当前用户是都对当前日记点赞过 true赞过 false没有")
    private Boolean zan;

    @ApiModelProperty(value = "是否为作者 true是 false不是")
    private Boolean author;

    @ApiModelProperty(value = "学习圈日记评论列表")
    private List<UserDiaryListVO> commentList;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "仅自己可见 1 是 0否")
    private Integer seeByMyself;

    @ApiModelProperty(value = "日记类型 diary日记 advert广告")
    private String type;

    @ApiModelProperty(value = "广告图片")
    private String advertImage;

    @ApiModelProperty(value = "广告跳转地址")
    private String advertUrl;

    @ApiModelProperty(value = "广告类型 accounting会计 tefl教资")
    private String advertType;

    @ApiModelProperty(value = "跳转h5显示的title")
    private String diaryH5Title;

    @SuppressWarnings("all")
    public enum TypeEnums {
        diary,
        advert,
        ;
    }
}
